package com.ruoyi.kiku.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.kiku.domain.KikuMusicInfo;
import com.ruoyi.kiku.mapper.KikuMusicInfoMapper;
import com.ruoyi.kiku.service.IKikuMusicInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 小鞠音乐信息Service业务层处理
 *
 * @author TT
 * @date 2025-03-12
 */
@Service
public class KikuMusicInfoServiceImpl implements IKikuMusicInfoService
{
    @Autowired
    private KikuMusicInfoMapper kikuMusicInfoMapper;

    /**
     * 查询小鞠音乐信息
     *
     * @param id 小鞠音乐信息主键
     * @return 小鞠音乐信息
     */
    @Override
    public KikuMusicInfo selectKikuMusicInfoById(Long id)
    {
        return kikuMusicInfoMapper.selectKikuMusicInfoById(id);
    }

    /**
     * 查询小鞠音乐信息列表
     *
     * @param kikuMusicInfo 小鞠音乐信息
     * @return 小鞠音乐信息
     */
    @Override
    public List<KikuMusicInfo> selectKikuMusicInfoList(KikuMusicInfo kikuMusicInfo)
    {
        return kikuMusicInfoMapper.selectKikuMusicInfoList(kikuMusicInfo);
    }

    /**
     * 新增小鞠音乐信息
     *
     * @param kikuMusicInfo 小鞠音乐信息
     * @return 结果
     */
    @Override
    public int insertKikuMusicInfo(KikuMusicInfo kikuMusicInfo)
    {
        kikuMusicInfo.setCreateTime(DateUtils.getNowDate());
        return kikuMusicInfoMapper.insertKikuMusicInfo(kikuMusicInfo);
    }

    /**
     * 修改小鞠音乐信息
     *
     * @param kikuMusicInfo 小鞠音乐信息
     * @return 结果
     */
    @Override
    public int updateKikuMusicInfo(KikuMusicInfo kikuMusicInfo)
    {
        kikuMusicInfo.setUpdateTime(DateUtils.getNowDate());
        return kikuMusicInfoMapper.updateKikuMusicInfo(kikuMusicInfo);
    }

    /**
     * 批量删除小鞠音乐信息
     *
     * @param ids 需要删除的小鞠音乐信息主键
     * @return 结果
     */
    @Override
    public int deleteKikuMusicInfoByIds(Long[] ids)
    {
        return kikuMusicInfoMapper.deleteKikuMusicInfoByIds(ids);
    }

    /**
     * 删除小鞠音乐信息信息
     *
     * @param id 小鞠音乐信息主键
     * @return 结果
     */
    @Override
    public int deleteKikuMusicInfoById(Long id)
    {
        return kikuMusicInfoMapper.deleteKikuMusicInfoById(id);
    }
}
